package learn_concurrent._8;

import java.util.concurrent.locks.LockSupport;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class T3 {
	static final Logger logger = LoggerFactory.getLogger(T3.class);

	public static void main(String[] args) throws InterruptedException {

		Thread t1 = new Thread(() -> {
			LockSupport.park();
			logger.info("1");
		}, "t1");
		t1.start();

		new Thread(() -> {
			logger.info("2");
			LockSupport.unpark(t1);
		}, "t2").start();

	}

}
